{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "608d0ee8-f760-4ad4-b79d-7ce844c8db05",
   "metadata": {},
   "source": [
    "判断题：在等温等压系统中自由能永不减小，可逆过程自由能不变，不可逆过程自由能增加  \n",
    "分三个部分……先找找自由能的表达式"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8848f412-8686-4848-b5fc-c88ff001b4f4",
   "metadata": {},
   "source": [
    "包景东书 2.1：焓、自由能和吉布斯函数  42页  \n",
    "自由能F：\n",
    "$$\n",
    "F \\equiv U-TS\n",
    "$$\n",
    "恒等号感觉可以用程序表示？"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0d108054-660f-4396-a7a9-05d3ad4674a5",
   "metadata": {},
   "source": [
    "然后是“等温等压系统”  \n",
    "没有直接的章节"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9cc51c72-6bcf-45e1-9a41-cf45d3c64c74",
   "metadata": {},
   "source": [
    "最后是“可逆过程”  \n",
    "没有直接的章节，不过第一章有卡诺热机"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "99950915-1599-43a8-8e24-7eece0595397",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 总之……先把自由能的恒等式表示出来吧\n",
    "F,U,T,S = var(\"F U T S\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "c269b775-39f4-4141-a5db-557d10948095",
   "metadata": {},
   "outputs": [],
   "source": [
    "F_eq = F==U-T*S"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "2cf70a5b-d38a-4717-b463-46dc53517a75",
   "metadata": {},
   "outputs": [],
   "source": [
    "assume(F==U-T*S) # 这样好像可以，用到微分方程里了？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "6690957d-9396-456e-acc2-05040f39949b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 然而要把热力学一二定律给用上呢\n",
    "# 用deepseek试着弄，给的sagemath程序跑不通"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "SageMath 10.5",
   "language": "sage",
   "name": "sagemath"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
